package com.woniuxy.consume;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class FanoutConsume {
    @RabbitListener(queues = "fanoutQueueA")
    public void receiveA(String msg){
        System.out.println("消费者A接受到消息："+msg);
    }

    @RabbitListener(queues = "fanoutQueueB")
    public void receiveB(String msg){
        System.out.println("消费者B接受到消息："+msg);
    }
}
